//
// Created by mio on 25-5-12.
//

#ifndef REMOTEWGT_H
#define REMOTEWGT_H

#include <QWidget>
#include <QLineEdit>
#include <QPushButton>

#include "RemoteManager.h"


class RemoteWgt : public QWidget
{
    Q_OBJECT
public:
    explicit RemoteWgt(QWidget *parent = nullptr);

public slots:
    void handleLogined(const std::string ip, uint16_t port);

private:
    QString ip_ = "";
    uint16_t port_ = -1;
    EventLoop* loop_ = nullptr;
    std::unique_ptr<RemoteManager> manager_ = nullptr;

    QLineEdit* selfcodeEdit_;
    QLineEdit* remoteEdit_;
    QPushButton* startRemoteBtn_;
    QPushButton* connSigBtn_;
    QPushButton* startPushBtn_;
};



#endif //REMOTEWGT_H
